<div class="myRightType" id="change">
	<div class="title" ng-init="shop.infoList=1">
		我的订单
	</div>
	<ul class="layui-clear getLi">
		<li ng-class="{active:shop.infoList==1}" ng-click="changeInfoList(1)">当前持仓</li>
		<li ng-class="{active:shop.infoList==2}" ng-click="changeInfoList(2)">历史订单</li>
		<li ng-class="{active:shop.infoList==3}" ng-click="changeInfoList(3)">我的账户</li>
	</ul>
	<div class="inner clearfix" id="inner">
		<!--当前持仓-->
		<div style="margin: 32px;" ng-show="shop.infoList==1">
			<table id="myChiList">

			</table>
		</div>
		<div style="margin: 32px;" ng-show="shop.infoList==2">
			<table id="myChiHistory">

			</table>
		</div>
		<!--个人信息-->
		<div id="infoMore" ng-show="shop.infoList==3">
			<div class="box layui-clear">
				<div class="lfoat">
					<img src="" ng-src="{{infoList.icon || 'img/timg.png'}}" id="txImg" />
					<br />
					<button class="layui-btn layui-btn-normal" id="changeTx">修改头像</button>
					<p>{{infoList.login}}</p>
				</div>
				<div class="lfoat" style="margin-left: 48px;width: 630px;">
					<div class="layui-clear">
						<span class="gray">账号</span>
						<span style="border-right: none;">{{infoList.login || "/"}}</span>
						<span class="gray">跟单金额</span>
						<span>{{infoList.amount || 0 |number:2 }}</span>

						<span class="gray" style="border-top: none;">杠杆比例</span>
						<span ng-show="infoList.leverage" style="border-top: none;border-right: none;">1:{{infoList.leverage}}</span>
						<span ng-show="!infoList.leverage" style="border-top: none;border-right: none;"> /</span>
						<span class="gray" style="border-top: none;">当前信用额</span>
						<span style="border-top: none;">{{infoList.credit  || 0 |number:2 }}</span>

						<span class="gray" style="border-top: none;">初始资金</span>
						<span style="border-top: none;border-right: none;">{{infoList.initBalance  || 0 |number:2 }}</span>
						<span class="gray" style="border-top: none;">当前余额</span>
						<span style="border-top: none;">{{infoList.currentBalance  || 0 |number:2 }}</span>

						<span class="gray" style="border-top: none;">累计入金</span>
						<span style="border-top: none;border-right: none;">{{infoList.balance || 0  |number:2  }}</span>
						<span class="gray" style="border-top: none;">累计盈利</span>
						<span style="border-top: none;">{{infoList.profit  || 0   |number:2  }}</span>

						<span class="gray" style="border-top: none;">累计出金</span>
						<span style="border-top: none;border-right: none;">{{infoList.withdrawal  || 0  |number:2 }}</span>
						<span class="gray" style="border-top: none;">年化收益</span>
						<span style="border-top: none;">{{infoList.year || 0  |number:2 }}</span>

						<span class="gray" style="border-top: none;">交易时长</span>
						<span style="border-top: none;border-right: none;">{{(infoList.createTime || 0) }}天</span>
						<span class="gray" style="border-top: none;"></span>
						<span style="border-top: none;"></span>
					</div>
					<!--跟单要求-->
					<div class="demand">
						<p class="blue">资金要求：</p>
						<p>跟单账户仓位过小可能会遗漏分配单量低于0.01手的订单，跟单客户建议随时查看仓位状况，保持一个合理仓位水平。 微信端所显示的仓位及净值状况为您本次登录时间同步结果，可能会与实际状况有少许误差，详情请登录客户端或CRM客户关系管理系统查看。
						</p>
						<p class="blue">跟单规则：</p>
						<p>客户账号通过审核后，可自由选择一个或多个信号源跟单，跟随多个信号源时，总资金为100%，即当拿出20%资金跟随信号源A，则跟随其他信号源的资金总量最多为80%。当信号源下单后，客户立即接收到跟单指令，实际跟单价格由于网络延迟、滑点等原因可能与信号源有细微差别。</p>
						<p class="blue">跟单提示：</p>
						<p>您可以只跟随一个信号源，也可以同时跟随多个信号源，信号源由您自主选择，交易有风险，投资须谨慎。</p>
					</div>

				</div>
			</div>
		</div>

	</div>
</div>
<script type="text/javascript">
	layui.use('upload', function() {
		var upload = layui.upload;
		//执行实例
		var uploadInst = upload.render({
			elem: '#changeTx' //绑定元素
				,
			url: '/wechat_mt5/user/upload/icon' //上传接口		
				,
			field: "uploadFile",
			before: function(obj) { //obj参数包含的信息，跟 choose回调完全一致，可参见上文。
				obj.preview(function(index, file, result) {
					$('#txImg').attr('src', result); //图片链接（base64）
				});
			},
			done: function(res) {
				//上传完毕回调
				if(res.code == 0) {
					prompt("修改成功");
				} else {
					prompt("修改失败");
				}

			},
			error: function() {
				prompt("修改失败");
			}
		});
	});

	$('#myChiList').bootstrapTable({
		url: "/wechat_mt5/data/more/position",
		method: 'get',
		columns: [{
			field: 'name',
			title: '名称',
			formatter: txFuction
		}, {
			field: 'order',
			title: '订单编号',

		}, {
			field: 'symbol',
			title: '交易品种',

		}, {
			field: 'cmd',
			title: '类别',
			formatter: type

		}, {
			field: 'volume',
			title: '手数',
			formatter: hand

		}, {
			field: 'openTime',
			title: '开仓时间',
			formatter: date

		}, {
			field: 'openPrice',
			title: '开仓价格',
		}, {
			field: 'sl',
			title: '止损',
		}, {
			field: 'tp',
			title: '止盈',
		}, {
			field: 'point',
			title: '获利点数',
			formatter: ponity
		}, {
			field: 'profit',
			title: '收益金额($)',
			formatter: money

		}, {
			field: 'id',
			title: '操作',
			formatter: ping
		}],
		height: 650,
		pageSize: 10,
		pageList: [10, 25, 50, 100],
		showRefresh: true,
		editable: true,
		// onClickRow:operateEvents,
		// showColumns: true,
		pagination: true,
		//		  striped: true,
		sidePagination: 'server',

	});

	
	//历史记录
	

	
	//			alertNew("跟单设置", 700, 560, $("#genSet"));
</script>